package com.example.xViewChat.UI;

import android.content.Intent;
import android.os.Bundle;
import com.example.xViewChat.NettyClient.PushManager;
import com.example.xViewChat.R;

public class WelocomeActivity extends EventListenerActivity {


    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        setContentView(R.layout.welcome);

        PushManager.init(WelocomeActivity.this, "192.168.0.141", 9090);
    }

    @Override
    protected void onResume(){
        super.onResume();
    }

    @Override
    protected void onStart(){
        super.onStart();
    }

    @Override
    public void onRestart(){
        super.onRestart();

    }
    @Override
    public void onConnectionSucceed() {
        System.out.println(" onConnectionSucceed oginActivity");
        Intent intent = new Intent(WelocomeActivity.this, LoginAcitivity.class);
        startActivity(intent);
        finish();
    }


    @Override
    public void onBackPressed() {
        finish();
        PushManager.destory(this);
    }

}